<{$start = ($Model.PageIndex - 4)|max:1}>
<{$end =($start + 9)|min: $Model.TotalPages}>
<{$start = 1|max: ($end - 9)}>
<div class="pager">
    <div class="page_css right">
        <span class="page_right">
            <input name="PageSize" type="hidden" value="<{$Model.PageSize}>"/>
        </span>
        <span class="page_left"><{$Model.TotalCount}> 记录&nbsp;
            <{if !$Model.IsFirstPage}>
                <a data-role="pager" data-index="1">首页</a>
                <a data-role="pager" data-index="<{$Model.PageIndex -1 }>">上一页</a>
            <{/if}>
            <{for $i = $start to $end}>
                <{if $Model.PageIndex == $i}>
                    <span class="current"><{$i}></span>
                <{else}>
                    <a data-role="pager" data-index="<{$i}>" ><{$i}></a>
                <{/if}>
            <{/for}>
            <{if !$Model.IsLastPage}>
                <a data-role="pager" data-index="<{$Model.PageIndex +1}>">下一页</a>
                <a data-role="pager" data-index="<{$Model.TotalPages }>">末页</a>
            <{/if}>
            <input name="PageIndex" class="text" onfocus="this.select();" type="text" style="width:<{$Model.TotalPages/1000 +20 }>px;" value="<{$Model.PageIndex}>"/>
            <a data-role="pager" style="background:none;background-color:#90B0C7;" title="跳转到指定页">Go</a>
        </span>
    </div>
</div>